'use strict';
module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('ThirdPartyApps', {
      id: {
        type: Sequelize.INTEGER,
        autoIncrement: true,
        primaryKey: true
      },
      appType: Sequelize.STRING, // 类型
      // appTypeLabel: Sequelize.STRING, // 类型中文标签(扩展)
      platform: Sequelize.STRING, // 支持平台
      appCode: Sequelize.STRING, // 专属代号
      appName: Sequelize.STRING,// 名称
      appUrl: {
        type: Sequelize.STRING(1024) // 链接
      },
      appIcon: Sequelize.STRING, // 图标
      forWalletVersion: Sequelize.STRING, // 版本号
      uiOptions: Sequelize.JSON, //
      chatDapp: Sequelize.BOOLEAN,  // 是否chatdapp
      seqNum: Sequelize.INTEGER, // app顺序
      createdAt: {
        allowNull: false,
        type: Sequelize.DATE
      },
      updatedAt: {
        allowNull: false,
        type: Sequelize.DATE
      }
    }, {
      charset: 'utf8',
      collate: 'utf8_general_ci'
    });
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('ThirdPartyApps');
  }
};